package com.jh.fcsm.common.mybatis;

import java.util.Map;

public class SelectDynamicProvider {

    public String selectDynamicList(Map<String, Object> json) {
        String sql = json.get("myQsql").toString();
        String[] tags = {"<where>", "<if", "<trim>", "<bind", "<choose>", "<when", "<foreach", "<set"};
        for (String tag : tags) {
            if (sql.contains(tag)) {
                return "<script>" + sql + "</script>";
            }
        }
        return sql;
    }
}
